Skip to content

Conversation

KathleenDollard
Copy link
Contributor

Fixes #924

As described in issue #924 use of host builders (see #919) is blocked because the Command is added to the CommandLineBuilder prior to configuration.

There are several ways to fix this. I chose this approach because:

  • Changing the behavior of RootCommand would be huge and breaking. Not passing anything to this gives you a pleasant default based on your executable and defaults. It's common to build on this.

  • I wanted to make it as hard as possible to set the command. In almost all cases, it should be set at builder instantiation as happens today.

  • I wanted the configurable builder pattern to be usable beyond the current host to other hosting scenarios (other host interfaces).

I am not happy with the name, but thought it was at least immensely clear.

@KathleenDollard
Copy link
Contributor Author

Let's look for a way to do this that is lighter than creating a new class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create mechanism for late addition of Command in CommandBuilder
2 participants